#while循环遍历

def list_while_func():
    my_list = [1,2,3,4,5,6]
    x = 0
    while x < len(my_list):
        print(my_list[x])
        x += 1

def list_for_func():
    my_list = [1,2,3,4,5,6]
    for x in range(0,len(my_list)):
        print(my_list[x])

def list_for_func2():
    my_list = [1,2,3,4,5,6]
    for element in my_list:
        print(element)

list_for_func()
list_for_func2()
list_while_func()